package com.woniuxy.myorders.service.impl;

import com.woniuxy.commons.entity.Orders;
import com.woniuxy.myorders.mapper.OrdersMapper;
import com.woniuxy.myorders.service.OrdersService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lhc
 * @create 2021-11-11 17:29
 */
@Service
public class OrdersServiceImpl implements OrdersService {
    @Resource
    private OrdersMapper ordersMapper;

    @Override
    public void updateOrdersById(Orders orders) {
        ordersMapper.updateOrdersById(orders);
    }

    @Override
    public List<Orders> selectAllOrders() {
        return ordersMapper.selectAllOrders();
    }

    @Override
    public List<Orders> selectOrdersByPage(Orders orders, Integer pageIndex, Integer pageSize) {
        return ordersMapper.selectOrdersByPage(orders, pageIndex, pageSize);
    }

    @Override
    public int selectCountOrdersByPage(Orders orders, Integer pageIndex, Integer pageSize) {
        return ordersMapper.selectCountOrdersByPage(orders, pageIndex, pageSize);
    }
}
